package com.china.school.exceptionhandler;

import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

@RestControllerAdvice
public class GlobalExceptionTest {


    @ExceptionHandler(IOException.class)
    public Object IOException(IOException ex, HttpServletResponse response){

        return null;
    }
    @ExceptionHandler(RuntimeException.class)
    public Object IOException(RuntimeException ex, HttpServletResponse response){

        return null;
    }
    @ExceptionHandler(Exception.class)
    public Object Exception(Exception ex, HttpServletResponse response){

        return null;
    }
}
